
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: class Resource</title>
</head><body bgcolor="#f0f0f8">
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;class&nbsp;for&nbsp;interacting&nbsp;with&nbsp;a&nbsp;resource.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="Resource-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Returns&nbsp;blob&nbsp;attached&nbsp;to&nbsp;node&nbsp;at&nbsp;specified&nbsp;id&nbsp;as&nbsp;HTML<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;format:&nbsp;string,&nbsp;Sanitizing&nbsp;transformation.<br>
&nbsp;&nbsp;&nbsp;&nbsp;Allowed&nbsp;values<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html&nbsp;-&nbsp;Return&nbsp;valid,&nbsp;sanitized&nbsp;html.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;plain&nbsp;-&nbsp;Return&nbsp;plain&nbsp;text&nbsp;-&nbsp;strip&nbsp;html&nbsp;tags.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raw&nbsp;-&nbsp;Return&nbsp;the&nbsp;entire&nbsp;content&nbsp;as-is.<br>
&nbsp;&nbsp;maxlength:&nbsp;integer,&nbsp;The&nbsp;max&nbsp;number&nbsp;of&nbsp;characters&nbsp;to&nbsp;return.&nbsp;Valid&nbsp;only&nbsp;for&nbsp;'plain'&nbsp;format.<br>
&nbsp;&nbsp;id:&nbsp;string,&nbsp;The&nbsp;id&nbsp;of&nbsp;the&nbsp;item&nbsp;that&nbsp;you&nbsp;want&nbsp;data&nbsp;about&nbsp;(required)&nbsp;(repeated)</tt></dd></dl>

<dl><dt><a name="Resource-insert"><strong>insert</strong></a> = method(self, **kwargs)</dt><dd><tt>Inserts&nbsp;a&nbsp;blob&nbsp;in&nbsp;the&nbsp;Freebase&nbsp;blobstore.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;lang:&nbsp;string,&nbsp;The&nbsp;key&nbsp;of&nbsp;a&nbsp;/type/lang&nbsp;object&nbsp;that&nbsp;will&nbsp;be&nbsp;used&nbsp;as&nbsp;the&nbsp;language&nbsp;-&nbsp;e.g.&nbsp;'fr'<br>
&nbsp;&nbsp;body:&nbsp;object,&nbsp;The&nbsp;request&nbsp;body.&nbsp;(required)<br>
&nbsp;&nbsp;text:&nbsp;string,&nbsp;The&nbsp;text&nbsp;data&nbsp;you&nbsp;want&nbsp;to&nbsp;upload.&nbsp;(required)<br>
&nbsp;&nbsp;text_encoding:&nbsp;string,&nbsp;The&nbsp;encoding&nbsp;of&nbsp;the&nbsp;content&nbsp;-&nbsp;e.g.&nbsp;'utf-8'<br>
&nbsp;&nbsp;use_permission_of:&nbsp;string,&nbsp;An&nbsp;id&nbsp;of&nbsp;an&nbsp;object&nbsp;that&nbsp;has&nbsp;the&nbsp;permissions&nbsp;that&nbsp;you&nbsp;want&nbsp;to&nbsp;use&nbsp;in&nbsp;the&nbsp;document&nbsp;node.<br>
&nbsp;&nbsp;entity:&nbsp;string,&nbsp;The&nbsp;entity&nbsp;you&nbsp;want&nbsp;to&nbsp;upload&nbsp;a&nbsp;description&nbsp;about.<br>
&nbsp;&nbsp;content:&nbsp;string,&nbsp;An&nbsp;id&nbsp;of&nbsp;a&nbsp;/type/content&nbsp;object&nbsp;that&nbsp;should&nbsp;be&nbsp;the&nbsp;last&nbsp;content&nbsp;attached&nbsp;to&nbsp;the&nbsp;document&nbsp;node&nbsp;specified.&nbsp;This&nbsp;is&nbsp;a&nbsp;consistency&nbsp;check&nbsp;and&nbsp;will&nbsp;make&nbsp;sure&nbsp;that&nbsp;the&nbsp;content&nbsp;has&nbsp;not&nbsp;changed&nbsp;since&nbsp;the&nbsp;request&nbsp;was&nbsp;created.&nbsp;The&nbsp;document&nbsp;parameter&nbsp;must&nbsp;also&nbsp;be&nbsp;passed&nbsp;if&nbsp;this&nbsp;is&nbsp;present.<br>
&nbsp;&nbsp;media_type:&nbsp;string,&nbsp;The&nbsp;mime&nbsp;content&nbsp;type&nbsp;of&nbsp;the&nbsp;text&nbsp;you&nbsp;are&nbsp;uploading&nbsp;-&nbsp;e.g.&nbsp;text/plain&nbsp;(required)<br>
&nbsp;&nbsp;document:&nbsp;string,&nbsp;An&nbsp;id&nbsp;of&nbsp;a&nbsp;/common/document&nbsp;object&nbsp;that&nbsp;you'd&nbsp;like&nbsp;to&nbsp;attach&nbsp;this&nbsp;content.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table>
</body></html>